xen.git
20 years agoAdd test for the last unresolved bit of bug #416. Check that
dan@localhost.localdomain [Thu, 1 Dec 2005 11:15:31 +0000 (11:15 +0000)]
Add test for the last unresolved bit of bug #416.  Check that
"xm list --long" reflects removed devices.

20 years agoMove net split driver onto ring.h generic rings.
kaf24@firebug.cl.cam.ac.uk [Thu, 1 Dec 2005 10:27:27 +0000 (11:27 +0100)]
Move net split driver onto ring.h generic rings.

No backend should SHARED_RING_INIT(): that's the frontend's job.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoptsname() is applied to the master fd, not the slave fd.
kaf24@firebug.cl.cam.ac.uk [Thu, 1 Dec 2005 10:10:40 +0000 (11:10 +0100)]
ptsname() is applied to the master fd, not the slave fd.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Thu, 1 Dec 2005 03:40:26 +0000 (03:40 +0000)]
Merged.

20 years agoMove the dom0 ballooning-out code from the xm create handler and into the
emellor@leeni.uk.xensource.com [Thu, 1 Dec 2005 03:39:23 +0000 (03:39 +0000)]
Move the dom0 ballooning-out code from the xm create handler and into the
server, where it can be used on reboot and migrate as well as create.
Ballooning bugs may still exist (it is unclear) but this is certainly a good
step in the right direction.

Ignore the memory and maxmem entries in the store for dom0 when restarting.
This means that the value in use at the time becomes the configured target.
This should fix the bug whereby dom0_mem settings on the command line are
being overridden by (older) entries in the store.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemove /local when xenstored starts. This stops stale data affecting the
emellor@leeni.uk.xensource.com [Thu, 1 Dec 2005 03:32:39 +0000 (03:32 +0000)]
Remove /local when xenstored starts.  This stops stale data affecting the
system immediately after reboot.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoWork around the fact that the physinfo dom0 call is not implemented for IA64.
emellor@leeni.uk.xensource.com [Thu, 1 Dec 2005 03:26:47 +0000 (03:26 +0000)]
Work around the fact that the physinfo dom0 call is not implemented for IA64.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Thu, 1 Dec 2005 03:21:45 +0000 (03:21 +0000)]
Merged.

20 years agoAdded a pages_to_kib function, which converts a page count into a number of
emellor@leeni.uk.xensource.com [Thu, 1 Dec 2005 03:19:40 +0000 (03:19 +0000)]
Added a pages_to_kib function, which converts a page count into a number of
KiB.  This allows us to compute the correct amount to balloon out to support
a migration.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMatch rename of free_pages field to free_memory
rread@ubuntu.eng.hq.xensource.com [Thu, 1 Dec 2005 03:11:49 +0000 (20:11 -0700)]
Match rename of free_pages field to free_memory

Signed-off-by: Robert Read <rread@xensource.com>
20 years agoRemove config.py, it's autogenerated from config.py.in
stekloff@elm3b216.beaverton.ibm.com [Thu, 1 Dec 2005 03:09:35 +0000 (03:09 +0000)]
Remove config.py, it's autogenerated from config.py.in

20 years agoMerged.
emellor@leeni.uk.xensource.com [Thu, 1 Dec 2005 03:07:24 +0000 (03:07 +0000)]
Merged.

20 years agoAdd a new /proc/xen file called 'capabilities'. Currently, when read in dom0 it will...
iap10@freefall.cl.cam.ac.uk [Thu, 1 Dec 2005 01:43:04 +0000 (02:43 +0100)]
Add a new /proc/xen file called 'capabilities'. Currently, when read in dom0 it will return 'control_d', and be empty when read in a guest. This provides a convenient way to allow the root user to detect whether they're running in a guest or dom0, and e.g. gate whether to start xend. In future, when we add more fine grained capabilities we will add other details into this file.

Signed-off-by: ian@xensource.com
20 years agoImprove the tls warning message to mention that the best soloution is to install...
iap10@freefall.cl.cam.ac.uk [Thu, 1 Dec 2005 01:36:46 +0000 (02:36 +0100)]
Improve the tls warning message to mention that the best soloution is to install a 'xen-friendly' glibc.

Signed-off-by: ian@xensource.com
20 years agoMerged.
emellor@leeni.uk.xensource.com [Wed, 30 Nov 2005 19:55:08 +0000 (19:55 +0000)]
Merged.

20 years agoAdded xm rename command. Improve the argument checking and error reporting.
emellor@leeni.uk.xensource.com [Wed, 30 Nov 2005 19:54:28 +0000 (19:54 +0000)]
Added xm rename command.  Improve the argument checking and error reporting.

20 years agoMiscellaneous tidying up, no semantic changes.
emellor@leeni.uk.xensource.com [Wed, 30 Nov 2005 19:48:54 +0000 (19:48 +0000)]
Miscellaneous tidying up, no semantic changes.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFix test following uuid format change in changeset 8089.
emellor@leeni.uk.xensource.com [Wed, 30 Nov 2005 19:48:21 +0000 (19:48 +0000)]
Fix test following uuid format change in changeset 8089.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMove the relocate.setupRelocation code into XendDomain, removing the mutual
emellor@leeni.uk.xensource.com [Wed, 30 Nov 2005 19:26:32 +0000 (19:26 +0000)]
Move the relocate.setupRelocation code into XendDomain, removing the mutual
dependency between those two classes.

Split the XendDomain constructor into two pieces so that XendDomainInfo can
call XendDomain.instance even during the initial startup of XendDomain.

These two together mean that there is no need for the horrendous hack using
XendRoot.get_component to pass the singleton instance of XendDomain around.
Both XendRoot.get_component and XendRoot.add_component can go.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMatch rename of xm info field from memory to total_memory.
emellor@leeni.uk.xensource.com [Wed, 30 Nov 2005 19:25:35 +0000 (19:25 +0000)]
Match rename of xm info field from memory to total_memory.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFix the reporting when this test fails (the eyecatcher variables would not be
emellor@leeni.uk.xensource.com [Wed, 30 Nov 2005 18:55:09 +0000 (18:55 +0000)]
Fix the reporting when this test fails (the eyecatcher variables would not be
created if the domain creation actually succeeded).  Use total_memory not
free_memory to determine how big to make the domain -- when ballooning down of
dom0 works properly, creating a domain larger than free_memory is possible.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoDon't refuse to clean up after a domain death when the buffer is not empty. If
emellor@leeni.uk.xensource.com [Wed, 30 Nov 2005 18:48:27 +0000 (18:48 +0000)]
Don't refuse to clean up after a domain death when the buffer is not empty.  If
the domain has gone away, then no-one can attach to the pty because Xend will
have cleaned up the entries in the store, so the pty will never become ready to
write.  The buffer will never get emptied, so cleanup will never occur. This
leaks ptys, file descriptors, and memory.  Simply throw those data away instead.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMove the translation from pages to MiB out of XendNode and into the xc layer.
emellor@leeni.uk.xensource.com [Wed, 30 Nov 2005 18:43:00 +0000 (18:43 +0000)]
Move the translation from pages to MiB out of XendNode and into the xc layer.
xc has access to the page size for the platform and the Python layer does not,
so there was a hardcoded "/ 256" in there.

Rename the "memory" physinfo parameter to "total_memory", to match the usage
elsewhere.

Tidy the code generating the SXP for xm info.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoCope with longs being passed to xstransact.write.
emellor@leeni.uk.xensource.com [Wed, 30 Nov 2005 18:38:48 +0000 (18:38 +0000)]
Cope with longs being passed to xstransact.write.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded the errno to the messages printed with the ERR macro. Tidy the use of
emellor@leeni.uk.xensource.com [Wed, 30 Nov 2005 18:38:14 +0000 (18:38 +0000)]
Added the errno to the messages printed with the ERR macro.  Tidy the use of
this macro where newlines have been appended -- the macro does this itself so
there is no need to add another one.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoGNTTABOP_map_grant_ref returns error status and handle as
kaf24@firebug.cl.cam.ac.uk [Wed, 30 Nov 2005 16:24:27 +0000 (17:24 +0100)]
GNTTABOP_map_grant_ref returns error status and handle as
separate fields. Update callers for new interface. Also
use int16_t as standard error code type on all public
interfaces.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoPublic interface cleanups. Widen some fields in public
kaf24@firebug.cl.cam.ac.uk [Wed, 30 Nov 2005 15:03:05 +0000 (16:03 +0100)]
Public interface cleanups. Widen some fields in public
interface defintions for future extensibility. In particular,
grant references are now 32 bits and this has some knock-on
effects on split-driver interfaces.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoRemove some vmx header files from Xen public interfaces.
kaf24@firebug.cl.cam.ac.uk [Wed, 30 Nov 2005 11:51:24 +0000 (12:51 +0100)]
Remove some vmx header files from Xen public interfaces.
They are not public.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoSome tweaks to the restore and migrate tests to expose the consoles of the
dan@guaranine.beaverton.ibm.com [Wed, 30 Nov 2005 11:44:19 +0000 (11:44 +0000)]
Some tweaks to the restore and migrate tests to expose the consoles of the
restored DomUs, since they currently Oops on x86_64.

20 years agoRemove useless test 05_create_noroot_noram
dan@caffeine.beaverton.ibm.com [Wed, 30 Nov 2005 11:42:07 +0000 (11:42 +0000)]
Remove useless test 05_create_noroot_noram

20 years agoEnable console debug dumping so that we submit the oops generated by
dan@guaranine.beaverton.ibm.com [Wed, 30 Nov 2005 11:41:33 +0000 (11:41 +0000)]
Enable console debug dumping so that we submit the oops generated by
network-detach to the reporting site.

20 years agoFix serial pty creation in qemu-dm. Set raw attributes to
kaf24@firebug.cl.cam.ac.uk [Wed, 30 Nov 2005 11:32:16 +0000 (12:32 +0100)]
Fix serial pty creation in qemu-dm. Set raw attributes to
avoid weird buffering behaviour and obtain the pty name
via ptsname().

Signed-off-by: Ping Yu <ping.y.yu@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoWe need to do sync when mov_to_cr3 to a value already shadowed.
kaf24@firebug.cl.cam.ac.uk [Wed, 30 Nov 2005 11:16:35 +0000 (12:16 +0100)]
We need to do sync when mov_to_cr3 to a value already shadowed.
The L2 page and already shadowed L1 page may be out of sync.
This fixes the problems of segmentation faults and strange prints
when booting Redhat FC3 and make kernel in FC3 in VMX domain.

Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
20 years agoAdd ATA-over-Ethernet as a module to the default 32-bit -xen config
kaf24@firebug.cl.cam.ac.uk [Wed, 30 Nov 2005 11:13:53 +0000 (12:13 +0100)]
Add ATA-over-Ethernet as a module to the default 32-bit -xen config
(it is already included in the default 64-bit -xen config).

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agodomain_pause duplicates the code from vcpu_pause. Eliminate the
kaf24@firebug.cl.cam.ac.uk [Wed, 30 Nov 2005 11:10:34 +0000 (12:10 +0100)]
domain_pause duplicates the code from vcpu_pause. Eliminate the
duplicate code and make domain_pause a mirror of the existing
domain_unpause.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
20 years agoRemoves the carriage returns from some of the vtpm
kaf24@firebug.cl.cam.ac.uk [Wed, 30 Nov 2005 11:07:28 +0000 (12:07 +0100)]
Removes the carriage returns from some of the vtpm
source files that were edited in windows at some point.

Signed-off-by: Vinnie Scarlata <vincent.r.scarlata@intel.com>
20 years agowritable_pl1e in shadow mode is a machine address, so
kaf24@firebug.cl.cam.ac.uk [Wed, 30 Nov 2005 10:36:57 +0000 (11:36 +0100)]
writable_pl1e in shadow mode is a machine address, so
is type physaddr_t, not unsigned long.

Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoDisable some over-zealous sanity checking for now (can cause major problems
smh22@firebug.cl.cam.ac.uk [Tue, 29 Nov 2005 16:59:03 +0000 (17:59 +0100)]
Disable some over-zealous sanity checking for now (can cause major problems
with live migration to localhost). A proper fix will follow.

Signed-off-by: Steven Hand <steven@xensource.com>
20 years agoFix typo.
smh22@firebug.cl.cam.ac.uk [Tue, 29 Nov 2005 15:03:06 +0000 (16:03 +0100)]
Fix typo.

Signed-off-by: Steven Hand <steven@xensource.com>
20 years agoTidy and comment use of canonicalise_mode, et al.
emellor@leeni.uk.xensource.com [Tue, 29 Nov 2005 15:01:47 +0000 (15:01 +0000)]
Tidy and comment use of canonicalise_mode, et al.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Tue, 29 Nov 2005 15:00:27 +0000 (15:00 +0000)]
Merged.

20 years agoIncrease device timeout to 10 seconds, as restarting a DHCP server takes a few
emellor@leeni.uk.xensource.com [Tue, 29 Nov 2005 15:00:01 +0000 (15:00 +0000)]
Increase device timeout to 10 seconds, as restarting a DHCP server takes a few
seconds, so we need to allow for that.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAvoid audit code during live migrate on 32bit since it's not required.
smh22@firebug.cl.cam.ac.uk [Tue, 29 Nov 2005 14:57:42 +0000 (15:57 +0100)]
Avoid audit code during live migrate on 32bit since it's not required.

Signed-off-by: Steven Hand <steven@xensource.com>
20 years agoSupport facilities for the new DHCP support.
emellor@leeni.uk.xensource.com [Tue, 29 Nov 2005 14:57:33 +0000 (14:57 +0000)]
Support facilities for the new DHCP support.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded trap for ERR, to get better response from the scripts when they are really
emellor@leeni.uk.xensource.com [Tue, 29 Nov 2005 14:56:54 +0000 (14:56 +0000)]
Added trap for ERR, to get better response from the scripts when they are really
broken, and add do_or_die command.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoReplace grep >&/dev/null with grep -q.
emellor@leeni.uk.xensource.com [Tue, 29 Nov 2005 14:56:16 +0000 (14:56 +0000)]
Replace grep >&/dev/null with grep -q.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded DHCP server support, configured by a dhcp=yes parameter. This will write
emellor@leeni.uk.xensource.com [Tue, 29 Nov 2005 14:55:48 +0000 (14:55 +0000)]
Added DHCP server support, configured by a dhcp=yes parameter.  This will write
the appropriate entries into dom0's DHCP server configuration file, allowing
that server to provide info for the guest when it starts.

If an IP address is not configured for vif-nat, invent one using the domain
ID and vif ID.

Fix the vif-nat script.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoTidy up audit code for PAE plus avoid its use during live migrate where
smh22@firebug.cl.cam.ac.uk [Tue, 29 Nov 2005 14:54:44 +0000 (15:54 +0100)]
Tidy up audit code for PAE plus avoid its use during live migrate where
it is not strictly required.

Signed-off-by: Steven Hand <steven@xensource.com>
20 years agoCleanup backend block device logic under save/restore; this should
smh22@firebug.cl.cam.ac.uk [Tue, 29 Nov 2005 13:50:30 +0000 (14:50 +0100)]
Cleanup backend block device logic under save/restore; this should
fix the issues some people have seen with segfaults in vbd_translate
and/or user-space hangs.

Signed-off-by: Steven Hand <steven@xensource.com>
20 years agoRemove shadow32 dead code (it's never built for other than
kaf24@firebug.cl.cam.ac.uk [Tue, 29 Nov 2005 13:37:24 +0000 (14:37 +0100)]
Remove shadow32 dead code (it's never built for other than
x86_32).

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix vmx guest issue of allowing accessing supervisor page
kaf24@firebug.cl.cam.ac.uk [Tue, 29 Nov 2005 10:48:33 +0000 (11:48 +0100)]
Fix vmx guest issue of allowing accessing supervisor page
from user level program.
In shadow fault, we need to check U/S bit in error code.
It is just a fix for shadow32.c, for x86_64 code and
public code, it is already handled.

Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
20 years agoSmall fix for shadow mode: fix a p.t. limit check.
kaf24@firebug.cl.cam.ac.uk [Tue, 29 Nov 2005 10:42:21 +0000 (11:42 +0100)]
Small fix for shadow mode: fix a p.t. limit check.

Signed-off-by:Xiaofeng Ling <xiaofeng.ling@intel.com>

20 years agoClean up a previous qemu workaround where we use
kaf24@firebug.cl.cam.ac.uk [Tue, 29 Nov 2005 10:40:16 +0000 (11:40 +0100)]
Clean up a previous qemu workaround where we use
/etc/xen/qemu-vgaram-bin as vgabios.

Signed-off-by: Ke Yu <ke.yu@intel.com>
20 years agoFix a race condition for multi-thread qemu dma, where vmx linux guests
kaf24@firebug.cl.cam.ac.uk [Tue, 29 Nov 2005 10:38:53 +0000 (11:38 +0100)]
Fix a race condition for multi-thread qemu dma, where vmx linux guests
show warning "dma interrupt lost" and dma becomes very slow.

root cause: In the time between set ide irq and set dma status, if guest
receive the irq and query the status, it will find the status is not
ready and therefore treat it as pseudo interrupt. Change the order of
set irq and set dma status fixes this issue.

Signed-off-by: Ke Yu <ke.yu@intel.com>
20 years agoFix minor traceback in xen-bugtool when send fails
pl@us.ibm.com [Tue, 29 Nov 2005 01:00:10 +0000 (01:00 +0000)]
Fix minor traceback in xen-bugtool when send fails

20 years agoThe device sharing check races when more than one file backed vbd is
rread@ubuntu.eng.hq.xensource.com [Mon, 28 Nov 2005 22:34:00 +0000 (15:34 -0700)]
The device sharing check races when more than one file backed vbd is
configured. Both of the files pick the same free loop device in the for
loop, and then one fails to losetup.  This patch will now retry if
losetup fails until it succeeds or no more devices are available.

Signed-off-by: Robert Read <robert@xensource.com>
20 years agoMake psmouse module builtin.
rread@ubuntu.eng.hq.xensource.com [Mon, 28 Nov 2005 19:16:27 +0000 (12:16 -0700)]
Make psmouse module builtin.

Signed-off-by: Robert Read <robert@xensource.com>
20 years agoBundle vcpu_time and vcpu_info structures together into a single
kaf24@firebug.cl.cam.ac.uk [Mon, 28 Nov 2005 18:48:54 +0000 (19:48 +0100)]
Bundle vcpu_time and vcpu_info structures together into a single
structure that is 64 bytes on x86. This ensures that indexing into
the array is fast (power-of-two size) and that accesses are cache
friendly (cache line size is usually 32 or 64 bytes).

Rename vcpu_data to vcpu_info, vcpu_time to vcpu_info.time.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix isConsoleDead() to actually run a command on the DomU, since a dead
dan@guaranine.beaverton.ibm.com [Mon, 28 Nov 2005 18:22:02 +0000 (18:22 +0000)]
Fix isConsoleDead() to actually run a command on the DomU, since a dead
console is no longer exposed when attempting to attach.  This makes test
04_memset_smallmem again able to detect console death and restart
xenconsoled so that the rest of the tests can run on x86_64.

20 years agoMerged.
emellor@leeni.uk.xensource.com [Mon, 28 Nov 2005 17:22:02 +0000 (17:22 +0000)]
Merged.

20 years agoMove mk-symlinks target into tools/Rules.mk.
cl349@firebug.cl.cam.ac.uk [Mon, 28 Nov 2005 17:07:22 +0000 (18:07 +0100)]
Move mk-symlinks target into tools/Rules.mk.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoChange uuid string format to match that outputted by Xen.
emellor@leeni.uk.xensource.com [Mon, 28 Nov 2005 16:48:25 +0000 (16:48 +0000)]
Change uuid string format to match that outputted by Xen.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoHardcode many cpu features for x86/64 -- we know 64-bit
kaf24@firebug.cl.cam.ac.uk [Mon, 28 Nov 2005 16:37:15 +0000 (17:37 +0100)]
Hardcode many cpu features for x86/64 -- we know 64-bit
cpus have many features by default.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoIn alloc_vcpu_struct, after doing a memset on the new allocated vcpu, we
kaf24@firebug.cl.cam.ac.uk [Mon, 28 Nov 2005 15:24:14 +0000 (16:24 +0100)]
In alloc_vcpu_struct, after doing a memset on the new allocated vcpu, we
do a memcpy from idle0_vcpu.arch to arch of the new vcpu, which causes
monitor_pagetable is set to a none 0 value.  For VMX guest which is
using external shadow mode, this is not what we really need. the
previous patch is OK for UP VMX guest, but failed on SMP VMX guest.

Signed-off-by: Xin Li <xin.b.li@intel.com>
20 years agoRemove bogus extra unmap_domain_page() call in
kaf24@firebug.cl.cam.ac.uk [Mon, 28 Nov 2005 15:17:03 +0000 (16:17 +0100)]
Remove bogus extra unmap_domain_page() call in
free_monitor_pagetable().

Signed-off-by: Xin Li <xin.b.li@intel.com>
20 years agomerge
Michael.Fetterman@cl.cam.ac.uk [Mon, 28 Nov 2005 14:30:48 +0000 (15:30 +0100)]
merge

20 years agomerge
Michael.Fetterman@cl.cam.ac.uk [Mon, 28 Nov 2005 14:22:47 +0000 (15:22 +0100)]
merge

Keir did a similar change earlier, but my version removed some special case
code as well, now that __gpfn_to_mfn() can protect itself.

20 years agominor printf and log message rework in the shadow code.
Michael.Fetterman@cl.cam.ac.uk [Mon, 28 Nov 2005 14:12:39 +0000 (15:12 +0100)]
minor printf and log message rework in the shadow code.

20 years agoAllow __gpfn_to_mfn() to automatically deal with translated domains != current.
Michael.Fetterman@cl.cam.ac.uk [Mon, 28 Nov 2005 14:09:44 +0000 (15:09 +0100)]
Allow __gpfn_to_mfn() to automatically deal with translated domains != current.

Renamed gpfn_to_mfn_foreign() to get_mfn_from_pfn_foreign(), making it more
consistent with get_mfn_from_pfn().

20 years agoarch/xen/kernel/fixup.c -> arch/xen/i386/kernel/fixup.c
kaf24@firebug.cl.cam.ac.uk [Mon, 28 Nov 2005 13:08:53 +0000 (14:08 +0100)]
arch/xen/kernel/fixup.c  -> arch/xen/i386/kernel/fixup.c
arch/xen/kernel/devmem.c -> drivers/xen/char/mem.c
arch/xen/kernel/smp.c deleted

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoSimplify boot_vcpu() implementation.
kaf24@firebug.cl.cam.ac.uk [Mon, 28 Nov 2005 12:39:22 +0000 (13:39 +0100)]
Simplify boot_vcpu() implementation.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
20 years agoUse StringIO to simplify string_iterator here. Altered the up-front
emellor@leeni.uk.xensource.com [Mon, 28 Nov 2005 12:21:17 +0000 (12:21 +0000)]
Use StringIO to simplify string_iterator here.  Altered the up-front
documentation.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded README.xen-bugtool.
emellor@leeni.uk.xensource.com [Mon, 28 Nov 2005 12:20:33 +0000 (12:20 +0000)]
Added README.xen-bugtool.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoChange uses of \s within sed regexps -- some versions of sed do not support this
emellor@leeni.uk.xensource.com [Mon, 28 Nov 2005 11:05:07 +0000 (11:05 +0000)]
Change uses of \s within sed regexps -- some versions of sed do not support this
escape.

Allow the vif-nat and vif-route scripts to have netdev specified, rather than
hard-coding eth0.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded xen-bugtool, an application that collects various system logs and can
emellor@leeni.uk.xensource.com [Mon, 28 Nov 2005 01:47:28 +0000 (01:47 +0000)]
Added xen-bugtool, an application that collects various system logs and can
save them as a tarball, or submit them to a pre-existing bugzilla bug.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoSet a console limit, in order to detect runaways.
emellor@leeni.uk.xensource.com [Sun, 27 Nov 2005 13:09:46 +0000 (13:09 +0000)]
Set a console limit, in order to detect runaways.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFix console handling; saveLog call was broken if ConsoleError occurred.
emellor@leeni.uk.xensource.com [Sun, 27 Nov 2005 10:46:26 +0000 (10:46 +0000)]
Fix console handling; saveLog call was broken if ConsoleError occurred.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemove keyword from call to xc.domain_setmaxmem; keyword support for this call
emellor@leeni.uk.xensource.com [Sun, 27 Nov 2005 01:28:11 +0000 (01:28 +0000)]
Remove keyword from call to xc.domain_setmaxmem; keyword support for this call
was removed with changeset 7955:f72da8799418.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Sun, 27 Nov 2005 01:06:44 +0000 (01:06 +0000)]
Merged.

20 years agoChange the console handling, to remove the loop and timeout if a console fails
emellor@leeni.uk.xensource.com [Sun, 27 Nov 2005 01:06:20 +0000 (01:06 +0000)]
Change the console handling, to remove the loop and timeout if a console fails
to respond first time.  For restored and unpaused domains there is no need for
the console to output data, so we cannot use this as a way to detect the
liveness of a console.  Instead, a command must always be sent to the console,
which means that this failure can only be detected once the constructor of the
Console class has returned successfully.  The __chewall loop still remains, in
order to detect runaway consoles and to clear out previous data from the
console before executing commands, but we no longer treat failure of that
method to read data as a failure of the console itself.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoUse the getId method to tidy up simple call to domid.
emellor@leeni.uk.xensource.com [Sun, 27 Nov 2005 01:02:36 +0000 (01:02 +0000)]
Use the getId method to tidy up simple call to domid.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemove looping from handling of xm domid. This command should now work first
emellor@leeni.uk.xensource.com [Sun, 27 Nov 2005 01:01:42 +0000 (01:01 +0000)]
Remove looping from handling of xm domid.  This command should now work first
time after creation of a domain.  Have the getRunningDomains method detect
failure of the xm list command, as indicated by the error code.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMark 03_network_attach_detach as XFAIL. There are known bugs in the network
emellor@leeni.uk.xensource.com [Sun, 27 Nov 2005 00:59:37 +0000 (00:59 +0000)]
Mark 03_network_attach_detach as XFAIL.  There are known bugs in the network
frontend device teardown.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRestore 05_create_noroot, as this test now seems to work, and remove
emellor@leeni.uk.xensource.com [Sun, 27 Nov 2005 00:58:44 +0000 (00:58 +0000)]
Restore 05_create_noroot, as this test now seems to work, and remove
13_create_multinic from the XFAIL list, as this one works also.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemove some Makefile cruft.
emellor@leeni.uk.xensource.com [Sun, 27 Nov 2005 00:57:34 +0000 (00:57 +0000)]
Remove some Makefile cruft.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded device-sharing checks for loopback-mounted files. The existing
emellor@leeni.uk.xensource.com [Sun, 27 Nov 2005 00:56:34 +0000 (00:56 +0000)]
Added device-sharing checks for loopback-mounted files.  The existing
check_sharing functions have been rejigged slightly so that the file-specific
stuff can share the code therein.  This separates the actual test from the
generation of the error message, and introduces the canonicalise_mode function.

This also restores the broken teardown functionality for file: devices -- the
writing of XENBUS_PATH/node had been removed, but this is required for file
device teardown.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRenable FAIL call that was disabled back when block-attach did not work.
emellor@leeni.uk.xensource.com [Sun, 27 Nov 2005 00:10:14 +0000 (00:10 +0000)]
Renable FAIL call that was disabled back when block-attach did not work.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoWrite the error message and the hotplug-status=busy in the same transaction, to
emellor@leeni.uk.xensource.com [Sat, 26 Nov 2005 23:59:09 +0000 (23:59 +0000)]
Write the error message and the hotplug-status=busy in the same transaction, to
ensure that the message is picked up.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFix formatting.
smh22@firebug.cl.cam.ac.uk [Sat, 26 Nov 2005 11:17:35 +0000 (12:17 +0100)]
Fix formatting.

Signed-off-by: Steven Hand <steven@xensource.com>
20 years agoFix save/restore and migrate on x86_64.
smh22@firebug.cl.cam.ac.uk [Sat, 26 Nov 2005 11:13:39 +0000 (12:13 +0100)]
Fix save/restore and migrate on x86_64.

Signed-off-by: Steven Hand <steven@xensource.com>
20 years agoMore cleanups to the pmd-shared patch.
kaf24@firebug.cl.cam.ac.uk [Sat, 26 Nov 2005 10:32:57 +0000 (11:32 +0100)]
More cleanups to the pmd-shared patch.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoClean the arch_memory_op() for-loop header.
kaf24@firebug.cl.cam.ac.uk [Sat, 26 Nov 2005 09:43:27 +0000 (10:43 +0100)]
Clean the arch_memory_op() for-loop header.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix x86_64 build.
smh22@firebug.cl.cam.ac.uk [Sat, 26 Nov 2005 09:24:08 +0000 (10:24 +0100)]
Fix x86_64 build.

Signed-off-by: Steven Hand <steven@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Sat, 26 Nov 2005 01:21:55 +0000 (01:21 +0000)]
Merged.

20 years agoFix the unpause_basic test. The console will appear to have failed, given the
emellor@leeni.uk.xensource.com [Sat, 26 Nov 2005 01:13:51 +0000 (01:13 +0000)]
Fix the unpause_basic test.  The console will appear to have failed, given the
current Console.py API, because no bytes have come from it, but that's not a
failure -- an unpaused domain has no reason to output any more data.  We need
to send a command to the domain before we can be sure whether it is alive or
dead, so move the FAIL call, allowing the console connection to throw
ConsoleError.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFix the 06_block-list_checkremove test. The use of string.find was invalid
emellor@leeni.uk.xensource.com [Sat, 26 Nov 2005 01:08:26 +0000 (01:08 +0000)]
Fix the 06_block-list_checkremove test.  The use of string.find was invalid
(should be testing against -1, not merely using if or if not), one block-list
command was missing, and the block-detach command is asynchronous (to give the
domain time to close down the device) so we need a time.sleep(1) call before
trying xm block-list.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded a comment.
emellor@leeni.uk.xensource.com [Sat, 26 Nov 2005 00:38:45 +0000 (00:38 +0000)]
Added a comment.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAlso, make a small tweak to the 12_block_attach test so that we don't leave
emellor@leeni.uk.xensource.com [Fri, 25 Nov 2005 23:19:23 +0000 (23:19 +0000)]
Also, make a small tweak to the 12_block_attach test so that we don't leave
a DomU running with a block device attached.

Signed-off-by: Dan Smith <danms@us.ibm.com>
20 years agoCheck when using physical devices that the device is not already in use. Using
emellor@leeni.uk.xensource.com [Fri, 25 Nov 2005 20:58:07 +0000 (20:58 +0000)]
Check when using physical devices that the device is not already in use.  Using
a device from two guests, or from dom 0 and a guest, can destroy the filesystem,
and this check prevents that.  This should ensure that the xm tests
11_block_attach_shared_dom0 and 12_block_attach_shared_domU should pass.
Closes bug #331.

Devices may be shared only if all uses are read-only.  If anyone has read-write
access to a device, then no sharing is allowed.

The mode in the config file may now have an exclamation mark appended, to
indicate that devices may be shared (i.e. that this new check should be
bypassed).  This supports some network block devices, but is clearly dangerous
and should only be used when you know what you are doing.

The mode specified in the config file is now written explicitly to the store,
To implement this, the blkback driver has been changed to create two entries
in /sys describing each device in use.  This means that we can determine which
devices are in use without crawling through the store.

The physical-device node has been changed to give the major and minor of the
device, separated by a colon.  This means that we do not need to pack these
numbers into one, removing the restriction to 8 bit minors that we had in place
before.

The mode specified in the config file is now written explicitly to the store,
rather than using the presence or absence of a read-only node.  This supports
the write-sharing override above.

If the device is in use, a new hotplug status of "busy" is written to the
store, and a message is written to a new hotplug-error node.  Xend uses these
things for diagnosis.

The block scripts do not need to handle online or offline events, so this
support has been removed.  These scripts can be called twice, depending upon
the hotplug config, so they now identify the second run and do not attempt to
set up the device again.

The device directories in the store are cleaned out before new details are
written there.  This prevents stale information from messing up block device
hotplugging.  This will be one cause of "blkback: changing physical device
not supported" messages.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoImplement new memory_op() XENMEM_machphys_mfn_list. Replaces old
kaf24@firebug.cl.cam.ac.uk [Fri, 25 Nov 2005 17:43:35 +0000 (18:43 +0100)]
Implement new memory_op() XENMEM_machphys_mfn_list. Replaces old
privcmd Linux ioctl and includes an implementation for x86/64.

Signed-off-by: Keir Fraser <keir@xensource.com>